<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<html>
<head>
<title>_进存途销</title>
<script type="text/javascript">
    
    var dataTables_in; //dataTables-进 

	$(function() {
	
	
		//初始化日期选择框
		var now = new Date();
		var today=(now.getFullYear())+"/"+(now.getMonth()+1)+"/"+(now.getDate());    
		$("#_dataRange").val(today+"-"+today);
		$("#_dataRange").daterangepicker({format: 'YYYY/MM/DD'});
		
		//初始化dataTables-进
	    dataTables_in=$("#table_in").dataTable({
           "bServerSide":true,
           "sAjaxSource":'${ctx}/v2/jctx/bindData_in',
           "fnServerData": retrieveData_working,
           "bFilter": false,
           "bSort": false,
           "sZeroRecords": "查询无记录！",
           "bProcessing": true,
           "oLanguage": {
               "sUrl": '${ctx}/static/v2/js/plugins/datatables/cn.txt'
            },
            "aoColumns": [ 
                    {"mData": 'customerCode'}, 
                    {"mData": 'shopna'},
                    {"mData": 'recena'},
                    {"mData": 'provna'},
                    {"mData": 'cacode'}
             ]
        });
		
		
	});
</script>
</head>

<body>
<section class="content">

		<div class="row">
			<div class="col-md-12">

				<!-- Primary box -->
				<div class="box box-solid box-primary">
					<div class="box-header">
						<i class="fa fa-search"></i>
						<h3 class="box-title">搜索栏</h3>
					</div>
					<div class="box-body">
							
					<!-- 第一行 -->
					<div class="form-group row">
					
						<div class="col-sm-3">
							<div class="input-group col-sm-12">
								<span class="input-group-text"> 商家名称： </span> 
								<select class="form-control required" id="_customerCode" onchange="ajaxAreaGroup(this,'_warehouseCode')">
									<option value=""></option>
									<c:forEach items="${customerList}" var="customer">
										<option value="${customer.customerCode}"
											<c:if test="${customerCode eq customer.customerCode}">selected=selected</c:if>>${customer.customerName}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="col-sm-3">
							<div class="input-group col-sm-12">
								<span class="input-group-text"> 作业仓库： </span> 
								<select class="form-control span3" id="_warehouseCode" >
									<option value=""></option>
									<c:forEach items="${warehouseList}" var="warehouse">
										<option value="${warehouse.groupCode}" >${warehouse.groupName}</option>
									</c:forEach>
								</select>
							</div>
						</div>
						
						<div class="col-sm-3">
							<div class="input-group col-sm-12">
								<span class="input-group-text"> SKU编号： </span> 
								<input type="text" class="form-control span3" id="_orderno" name="_orderno">
							</div>
						</div>
						
					</div>

                    <!-- 第二行 -->
					<div class=" form-group row">

						<div class="col-sm-6">
							<div class="input-group col-sm-12">
								<span class="input-group-text"> 日期范围： </span>

								<div class="input-group">
									<div class="input-group-addon">
										<i class="fa fa-calendar"></i>
									</div>
									<input type="text" class="form-control pull-right" id="_dataRange" name="_dataRange" value="${param._fromDate}"/>
								</div>
								
							</div>
						</div>
						
						<div class="col-sm-6">
							<button class="btn btn-primary" type="button" onclick="query();">查询</button>
						</div>
						
					</div>				


					</div>

				</div>
			</div>
		</div>

        <!-- 总览 -->
		<div class="form-group row">
			<div class="col-md-12">
				<div class="box box-primary">
					<div class="box-header"></div>
					<div class="box-body">

						<div class="row">
							<div class="col-md-12">

								<div class="col-md-2">
									<div class="small-box bg-blue">
										<div class="inner"><h3>150</h3><p> <h2> <span class="font-yh">进</span> </h2> </p></div>
										<div class="icon"><i class="ion ion-android-archive"></i></div>
										<a class="small-box-footer" href="#"> More info <i class="fa fa-arrow-circle-right"></i> </a>
									</div>
								</div>

								<div class="col-md-1">
									<div class="small-box">
										<div class="icon" style="position:inherit!important; margin-bottom: -15px!important;">
											<i class="icon ion-ios7-pause" style="transform:rotate(90deg);position:inherit!important;left:5px;"></i>
										</div>
									</div>
								</div>

								<div class="col-md-2">
									<div class="small-box bg-aqua">
										<div class="inner"><h3>150</h3><p><h2><span class="font-yh">存</span></h2></p></div>
										<div class="icon"><i class="ion ion-filing"></i></div>
										<a class="small-box-footer" href="#"> More info <i class="fa fa-arrow-circle-right"></i> </a>
									</div>
								</div>

								<div class="col-md-1">
									<div class="small-box">
										<div class="icon" style="position:relative!important;margin-bottom: -15px!important; "><i class="fa fa-plus"></i></div>
									</div>
								</div>

								<div class="col-md-2">
									<div class="small-box bg-yellow">
										<div class="inner"><h3>150</h3><p><h2><span class="font-yh">途</span></h2></p></div>
										<div class="icon"><i class="icon ion-map"></i></div>
										<a class="small-box-footer" href="#"> More info <i class="fa fa-arrow-circle-right"></i> </a>
									</div>
								</div>

								<div class="col-md-1">
									<div class="small-box">
										<div class="icon" style="position:relative!important;margin-bottom: -15px!important;"><i class="fa fa-plus""></i></div>
									</div>
								</div>

								<div class="col-md-2">
									<div class="small-box bg-green">
										<div class="inner">
											<h3>150</h3><p><h2><span class="font-yh">销</span></h2></p>
										</div>
										<div class="icon">
											<i class="icon ion-ios7-cart"></i>
										</div>
										<a class="small-box-footer" href="#"> More info <i class="fa fa-arrow-circle-right"></i> </a>
									</div>
								</div>

								<div class="col-md-1" style="display: table-cell; text-align:center; *display: block; ">
<!-- 									<i class="fa fa-check-circle text-green" style="font-size: 60px;margin-top:50px;"></i> -->
									    <i class="fa fa-warning text-red" style="font-size: 50px;margin-top: 50px;"></i>
								</div>

							</div>
						</div>



					</div>

				</div>
			</div>
		</div>

        <!-- tab明细显示 -->
		<div class="row">
			<div class="col-md-12">
				<div class="nav-tabs-custom">
					<ul class="nav nav-tabs">
						<li class="active"><a data-toggle="tab" href="#tab_in">进</a></li>
						<li><a data-toggle="tab" href="#tab_stock">存</a></li>
						<li><a data-toggle="tab" href="#tab_onway">途</a></li>
						<li><a data-toggle="tab" href="#tab_sale">销</a></li>
					</ul>
					<div class="tab-content">
						
						<!-- 进 -->
						<div id="tab_in" class="tab-pane active">

							<table id="table_in" class="table table-bordered table-striped">
								<thead>
									<tr>
										<th style="width: 50px;">商家</th>
										<th style="width: 100px;">能容订单号</th>
										<th style="width: 100px;">来源店铺</th>
										<th style="width: 50px;">收货人</th>
										<th style="width: 100px;">目的地</th>
										<th style="width: 50px;">指定快递公司</th>
										<th style="width: 100px;">审单时间</th>
										<th style="width: 100px;">查询操作</th>
									</tr>
								</thead>
							</table>

						</div>
						
						
						<div id="tab_stock" class="tab-pane">

							<table class="table table-striped table-bordered table-condensed">
								<thead>
									<tr>
										<th>商家</th>
										<th>入库类型</th>
										<th>仓库</th>
										<th>SKU数量</th>
										<th>商品数量</th>
										<th>登记时间</th>
										<th>状态</th>
										<th>处理人</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td>3</td>
										<td>1000</td>
										<td>2014-06-22 17:15:23</td>
										<td>入库登记</td>
										<td>张三</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td>5</td>
										<td>2000</td>
										<td>2014-06-19 14:45:05</td>
										<td>入库登记</td>
										<td>李四</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>入库登记</td>
										<td>管理员</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td></td>
										<td></td>
										<td>2014-06-19 14:45:05</td>
										<td>入库登记</td>
										<td>管理员</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>入库登记</td>
										<td>管理员</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td></td>
										<td></td>
										<td>2014-06-19 14:45:05</td>
										<td>入库登记</td>
										<td>管理员</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>入库登记</td>
										<td>管理员</td>
									</tr>
								</tbody>
							</table>

						</div>

						<div id="tab_onway" class="tab-pane">

							<table class="table table-striped table-bordered table-condensed">
								<thead>
									<tr>
										<th>商家</th>
										<th>入库类型</th>
										<th>仓库</th>
										<th>入库单号</th>
										<th>出库单号</th>
										<th>SKU数量</th>
										<th>商品数量</th>
										<th>状态</th>
										<th>处理人</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td>RK140622171523</td>
										<td>3</td>
										<td>1000</td>
										<td>2014-06-22 17:15:23</td>
										<td>发往山西</td>
										<td>张三</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td>RK140619144505</td>
										<td>5</td>
										<td>2000</td>
										<td>2014-06-19 14:45:05</td>
										<td>发往山西</td>
										<td>李四</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td>RK140622171523</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>发往山西</td>
										<td>管理员</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td>RK140619144505</td>
										<td></td>
										<td></td>
										<td>2014-06-19 14:45:05</td>
										<td>发往山西</td>
										<td>管理员</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td>RK140622171523</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>发往山西</td>
										<td>管理员</td>
									</tr>
									<tr>
										<td>伟易达</td>
										<td>取消单入库</td>
										<td>华南(深圳)</td>
										<td>RK140619144505</td>
										<td></td>
										<td></td>
										<td>2014-06-19 14:45:05</td>
										<td>发往山西</td>
										<td>管理员</td>
									</tr>

									<tr>
										<td>亿觅</td>
										<td>采购入库</td>
										<td>华南(深圳)</td>
										<td>RK140622171523</td>
										<td></td>
										<td></td>
										<td>2014-06-22 17:15:23</td>
										<td>发往山西</td>
										<td>管理员</td>
									</tr>
								</tbody>
							</table>

						</div>

						<div id="tab_sale" class="tab-pane">

							<table class="table table-striped table-bordered table-condensed">
								<thead>
									<tr>
										<th>买家</th>
										<th>仓库</th>
										<th>快递</th>
										<th>商品数量</th>
										<th>金额</th>
										<th>登记时间</th>
										<th>签收时间</th>
										<th>状态</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>发发呆</td>
										<td>华南(深圳)</td>
										<td>圆通</td>
										<td>3</td>
										<td>1000.00</td>
										<td>2014-06-22 17:15:23</td>
										<td>2014-06-29 14:55:33</td>
										<td>张三</td>
									</tr>
									<tr>
										<td>发发呆</td>
										<td>华南(深圳)</td>
										<td>圆通</td>
										<td>3</td>
										<td>1000.00</td>
										<td>2014-06-22 17:15:23</td>
										<td>2014-06-29 14:55:33</td>
										<td>张三</td>
									</tr>

									<tr>
										<td>发发呆</td>
										<td>华南(深圳)</td>
										<td>圆通</td>
										<td>3</td>
										<td>1000.00</td>
										<td>2014-06-22 17:15:23</td>
										<td>2014-06-29 14:55:33</td>
										<td>张三</td>
									</tr>
									<tr>
										<td>发发呆</td>
										<td>华南(深圳)</td>
										<td>圆通</td>
										<td>3</td>
										<td>1000.00</td>
										<td>2014-06-22 17:15:23</td>
										<td>2014-06-29 14:55:33</td>
										<td>张三</td>
									</tr>
									<tr>
										<td>发发呆</td>
										<td>华南(深圳)</td>
										<td>圆通</td>
										<td>3</td>
										<td>1000.00</td>
										<td>2014-06-22 17:15:23</td>
										<td>2014-06-29 14:55:33</td>
										<td>张三</td>
									</tr>

								</tbody>
							</table>

						</div>
					</div>
				</div>
			</div>

		</div>

	</section>

</body>
</html>